#include <allegro.h>
#include <stdio.h>

#define GFX_W 800
#define GFX_H 600



typedef struct {
int x,y;
BITMAP *car;
} Car ;


int get_pixel(BITMAP* Buffer,int x,int y);

BITMAP* load_background_bmp(BITMAP *Background);
void draw_background(BITMAP *Background,BITMAP*Buffer, int position);
void destroy_background(BITMAP * Background);
void move_background(BITMAP * Background, int *position, BITMAP *Buffer);

void load_cars(Car *car, Car *car_r);
void destroy_cars(Car *car, Car *car_r);
void init_cars(Car *car, Car *car_r);

void move_car(Car *car, int c1);
void move_car_random(Car *car_r, int c2);
void move_cars(Car *car, Car *car_r,int position, BITMAP * Background, BITMAP *Buffer);
void draw_cars(Car *car, Car *car_r,BITMAP *Buffer);
void win_lose(int c1, int c2, int position, BITMAP *Buffer);
